<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); ?>

<?php 
	$ci = & get_instance();
	$mid = intval($_GET['mid']);
	$MATCH = $ci->match_entity->init("id", $mid);
	$TEAM_HOME = clone_($ci->team_entity->init('id', $MATCH->getHome()));
	$TEAM_AWAY = clone_($ci->team_entity->init('id', $MATCH->getAway()));	
?>

<div class="blockitem" style="position:relative;">
	<div class="grid1" style="width:80px;">
		<span class="upcoming capitalize bold ui-corner-all">upcoming</span>
	</div>
	<div class="grid6" style="text-align:center;"><h4 style="text-decoration:underline;"><?php echo $MATCH->getTitle();?></h4></div>
	<div class="clrboth"></div>
	
	<div class="grid3">
		<div class="team">
			<?php echo thumb($TEAM_HOME->getMyFlagTeam(),IMG_TEAMPIC_W,IMG_TEAMPIC_H);?>
			
			<div class="clrboth"></div>
			<span class="bold">
				<?php echo $MATCH->displayMatchInfo('home');?>
			</span>
			<div class="clrboth"></div>
		</div>
	</div>
	
	<div class="grid1" style="text-align:center;width:80px;"><?php echo vs_image(); ?></div>
	
	<div class="grid3">
		<div class="team">
			<?php echo thumb($TEAM_AWAY->getMyFlagTeam(),IMG_TEAMPIC_W,IMG_TEAMPIC_H);?>
			<div class="clrboth"></div>
			<span class="bold">
				<?php echo $MATCH->displayMatchInfo('away');?>
			</span>
		</div>
	</div>
	
	<div class="clrboth"></div>
	<div class="grid7">
		<div class="result-text" style="text-align:center;"><?php echo $MATCH->displayMatchInfo('closed');?></div>
	</div>
	
	<a href="<?php echo site_url("cricket");?>" style="color:#006699;" class="back_button" title="Back?">
		Back
	</a>
	<div class="refresh_button" title="Refresh?" onclick="return doRefresh(<?php echo $mid;?>);"></div>
	
</div>